package com.ideazd.api.msm;


import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;



public class Test {
	public static void main(String[] args) {
		//System.out.println(SentMessage.sentVerifyCode('18259077697', '666666'));
		
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		try {
			Date dateTime = simpleDateFormat.parse("2016-03-22 00:00:00");
			Date dateTime2 = simpleDateFormat.parse("2016-03-23 00:00:00");
			System.out.println(dateTime2.getTime()-dateTime.getTime());
			System.out.println("denmark dutch egypt england english february finland finish france frensh");
			System.out.println("friday geneva german germany greece greek holland");
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");
		DateFormat dfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
		
		System.out.println(df.format(new Date()));
		System.out.println(dfs.format(new Date()));
		
		String ss = "<iframe src='http://www.tudou.com/programs/view/html5embed.action?type=0&code=VXwaz99AjJU&lcode=&resourceId=416257335_06_05_99' allowtransparency='true' allowfullscreen='true' allowfullscreenInteractive='true' scrolling='no' border='0' frameborder='0' style='width:480px;height:400px;'></iframe>";
		ss = ss.substring(ss.indexOf("src")+5);
		ss = ss.substring(0,ss.indexOf("'")-1);
		
		System.out.println(toLowerCaseTheFristChar("fuck"));
		
		try {
			System.out.println(ss);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    } 
	
	
	public static String toLowerCaseTheFristChar(String str){
		StringBuffer sb = new StringBuffer();
		if(str!=null){
			for(int i=0;i<str.length();i++){
				char c = str.charAt(i);
				
				if(i == 0){
					sb.append(Character.toUpperCase(c));
				}else{
					sb.append(Character.toLowerCase(c));
				}
			}
		}
		
		return sb.toString();
  }
}
